<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>我的--用户</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../css/aui-flex.css"/>
    <style>
        body {
            font-size: 14px;
            background: #f3f3ff;
        }

        header.headerBuyer {
            background: url(../image/seller.jpg) !important;
        }

        header {
            background: #00a9e3;
            position: relative;
            color: #fff;
            font-weight: 400;
        }

        .aui-grid-sixteen li p {
            font-size: 12px;
            margin-top: -5px;
        }

        .aui-grid-sixteen li span {
            color: #9c9c9c;
            font-size: 20px;
            line-height: 44px;
        }

        .my-nav p {
            font-size: 12px;
        }

        .my-menu {
            width: 100%;
            height: 65px;
            /*line-height: 45px;*/
            left: 0;
            bottom: 0;
            text-align: center;
            background: #ffffff;
            filter: Alpha(opacity=50);
            background: rgba(0, 0, 0, 0.2) none repeat scroll 0 0 !important;
            color: #ffffff;
            font-size: 14px;
            position: absolute;
            bottom: 0;
        }

        .aui-grid-sixteen {
            background: none;
            border: 0;
            height: 100%;
        }

        .aui-grid-sixteen li p, .aui-grid-sixteen li span {
            color: #fff;
        }

        .aui-text-primary img {
            width: 50px;
        }

        .aui-grid-nine {
            /*background: rgba(0,0,0,.2);*/
            /*position: absolute;*/
            bottom: 0;
            width: 100%;
        }
        .aui-grid-nine:after,
        .aui-grid-nine:before{
            border:none;
        }
/*        .aui-grid-nine1{
            background: rgba(255,255,255,0.5);
        }
        .aui-grid-nine1:after,
        .aui-grid-nine1:before{
            border:none;
        }
        .aui-grid-nine1 li,
        .aui-grid-nine1 li:after,
        .aui-grid-nine1 li:before{
            border-color: rgba(255,255,255,0.5);
        }*/

        .color-gray{
            color:#777 !important;
        }

        .touxiang {
            background-size: cover;
            background-position: center;
            height: 60px;
            width: 60px;
            margin:0 auto;
        }
    </style>
</head>
<body>
<header>
    <div class="aui-flex-col">
        <!-- <div class="  aui-flex-item-12   aui-margin-b-15" style="height: 34px;">
            <div class="aui-btn aui-pull-right aui-flex-item-2 black-3  border-none">设置</div>
        </div> -->

        <div class="aui-flex-item-12" style="margin-top: 40px;">
            <div class=" radius-50 touxiang" ></div>
        </div>
        <div class="aui-flex-item-12" align="center" style="margin:17px 0;">
             <span class="name"></span> (<span><em id="shared_grade"></em>级玩家</span>)
        </div>
<!--         <div class="aui-flex-item-12"></div>
            <div class=" radius-50 touxiang" style="background-image: url(../image/touxiang.jpg)">
            
            <div>
                <span class="name"></span>
            </div>
            <div class=" aui-flex-row aui-flex-middle aui-padded-l-10 name" style="width:calc((100% - 80px)/2)">---
            </div>
            <div class=" aui-flex-row aui-flex-middle aui-text-right userType" style="width:calc((100% - 80px)/2)">
                <span><em id="shared_grade"></em>级玩家</span>
            </div>

        </div> -->
    </div>

    <ul class="aui-grid-nine">
        <li class="aui-col-xs-4 aui-padded-5 aui-text-center" onclick="openToTwo('myBeansManage_win')">
            <span class="aui-text-danger" id="vmoney_total">---</span>
            <p class="font-black-12">积分余额</p>
        </li>
        <li class="aui-col-xs-4 aui-padded-5 aui-text-center" onclick="openToTwo('myBeansManage_win')">
            <span class="aui-text-danger" id="vmoney_user">---</span>
            <p class="font-black-12">可奖励积分</p>
        </li>
        <li class="aui-col-xs-4 aui-padded-5 aui-text-center" onclick="openToTwo('allOrderList_win')">
            <span class="aui-text-danger" id="amount_total">---</span>
            <p class="font-black-12">总消费</p>
        </li>
        <li class="aui-col-xs-4 aui-padded-5 aui-text-center" onclick="openToTwo('myBeansManage_win')">
            <span class="aui-text-danger" id="money_withdrawal">---</span>
            <p class="font-black-12">金豆余额</p>
        </li>
        <li class="aui-col-xs-4 aui-padded-5 aui-text-center" onclick="openToTwo('myBeansManage_win')">
            <span class="aui-text-danger" id="vmoney_returned">---</span>
            <p class="font-black-12">已奖励金豆</p>
        </li>
        <li class="aui-col-xs-4 aui-padded-5 aui-text-center" onclick="openToTwo('allOrderList_win')">
            <span class="aui-text-danger" id="amount_total">---</span>
            <p class="font-black-12">积分奖励基数</p>
        </li>

    </ul>

</header><!-- /header -->
<!-- 默认是买家，切换卖家时，如果还没认证就提示认证，如果认证了，就直接切换 -->
<div class="contains">
    <div class="aui-content">


        <!--<div class="aui-content">-->
        <!--<ul class="aui-grid-nine">-->
        <!--<li class="aui-col-xs-6 aui-text-center"  tapmode onclick="openToTwo('incomeCheck_win')">-->
        <!--<span class="aui-iconfont   aui-text-primary"><img src="../image/incomecheck.png"></span>-->
        <!--<p>收入查询</p>-->
        <!--</li>-->
        <!--<li class="aui-col-xs-6 aui-text-center" tapmode onclick="openToTwo('informationSetting')">-->
        <!--<span class="aui-iconfont   aui-text-primary"><img src="../image/messageset.png"></span>-->
        <!--<p>信息维护</p>-->
        <!--</li>-->
        <!--<li class="aui-col-xs-6 aui-text-center" tapmode onclick="openToTwo('incomeQRCode_win')">-->
        <!--<span class="aui-iconfont   aui-text-primary"><img src="../image/incomeqrcode.png"></span>-->
        <!--<p>收款二维码</p>-->
        <!--</li>-->
        <!--<li class="aui-col-xs-6 aui-text-center" tapmode onclick="goToWeb()">-->
        <!--<span class="aui-iconfont   aui-text-primary"><img src="../image/goshop.png"></span>-->
        <!--<p>进入商城</p>-->
        <!--</li>-->
        <!--</ul>-->
        <!--</div>-->
        <div class="aui-content">
            <ul class="aui-list-view  after-no-border">
                <li class="aui-list-view-cell"  tapmode onclick="openToTwo('allOrderList_win')">
                    <div class="aui-arrow-right">
                        <i class="aui-iconfont aui-bg-blue radius-50 radius-50 aui-bg-danger aui-icon-form"></i>全部订单
                        <span class="aui-pull-right aui-margin-r-15 color-gray">查看订单</span>
                    </div>
                </li>
                <!--<li class="aui-list-view-cell"  tapmode onclick="openToTwo('test_win')">-->
                    <!--<div class="aui-arrow-right">-->
                       <!--测试-->
                    <!--</div>-->
                <!--</li>-->
                <!--<li class="aui-list-view-cell"  tapmode onclick="openToTwo('incomeCheck_win')">-->
                <!--<div class="aui-arrow-right">-->
                <!--<i class="aui-iconfont radius-50 aui-bg-primary aui-icon-recharge"></i>收入查询-->
                <!--</div>-->
                <!--</li>-->
                <!--<li class="aui-list-view-cell">-->
                <!--<div class="aui-arrow-right">-->
                <!--<i class="aui-iconfont radius-50 aui-bg-info aui-icon-repair"></i>信息维护-->
                <!--</div>-->
                <!--</li>-->
                <li class="aui-list-view-cell" tapmode onclick="getQRcode('f4')">
                    <div class="aui-arrow-right">
                        <i class="aui-iconfont radius-50 aui-bg-warning aui-icon-barcode"></i>扫一扫
                    </div>
                </li>
                <!--<li class="aui-list-view-cell" tapmode onclick="goToHome(1)">-->
                <!--<div class="aui-arrow-right">-->
                <!--<i class="aui-iconfont radius-50 aui-bg-danger aui-icon-shop"></i>进入商城-->
                <!--</div>-->
                <!--</li>-->
                <li class="aui-list-view-cell" tapmode onclick="openToTwo('consumeQRcodeList_win')">
                <div class="aui-arrow-right">
                <i class="aui-iconfont radius-50 aui-bg-pink aui-icon-ticket"></i>我的消费码
                <!--<span class="aui-pull-right aui-margin-r-15">待扫码10张</span>-->
                </div>
                </li>
                <!--<li class="aui-list-view-cell">-->
                <!--<div class="aui-arrow-right">-->
                <!--<i class="aui-iconfont radius-50 aui-bg-primary aui-icon">奖</i>积分抽奖-->
                <!--<span class="aui-pull-right aui-margin-r-15">最高赢小米MIX</span>-->
                <!--</div>-->
                <!--</li>-->
                <!--<li class="aui-list-view-cell">-->
                <!--<div class="aui-arrow-right">-->
                <!--<i class="aui-iconfont radius-50 aui-bg-warning aui-icon-radiobox"></i>积分气运转盘-->
                <!--<span class="aui-pull-right aui-margin-r-15">积分自身也有运气</span>-->
                <!--</div>-->
                <!--</li>-->
                <!--<li class="aui-list-view-cell"  tapmode onclick="openToTwo('myBeans_win')">-->
                <!--<div class="aui-arrow-right">-->
                <!--<i class="aui-iconfont radius-50 aui-bg-success aui-icon-refund"></i>爱心豆回购-->
                <!--<span class="aui-pull-right aui-margin-r-15">有商家正在收</span>-->
                <!--</div>-->
                <!--</li>-->
                <li class="aui-list-view-cell"  tapmode onclick="openToTwo('myIntegration_win')">
                <div class="aui-arrow-right">
                <i class="aui-iconfont radius-50 aui-bg-primary aui-icon-forward"></i>积分转出
                <span class="aui-pull-right aui-margin-r-15 color-gray">20</span>
                </div>
                </li>
                <!--<li class="aui-list-view-cell"  tapmode onclick="openToTwo('incentiveRecord_win')">-->
                <!--<div class="aui-arrow-right">-->
                <!--<i class="aui-iconfont radius-50 aui-bg-pink aui-icon-calendar"></i>已激励金豆记录-->
                <!--<span class="aui-pull-right aui-margin-r-15">0</span>-->
                <!--</div>-->
                <!--</li>-->

                <!--<li class="aui-list-view-cell" tapmode onclick="openToTwo('popInputPay_win')">-->
                    <!--<div class="aui-arrow-right">-->
                        <!--<i class="aui-iconfont radius-50 aui-bg-info aui-icon-present"></i>我的金豆管理-->

                    <!--</div>-->
                <!--</li>-->

                <li class="aui-list-view-cell" tapmode onclick="openToTwo('myBeansManage_win')">
                    <div class="aui-arrow-right">
                        <i class="aui-iconfont radius-50 aui-bg-pink aui-icon-like"></i>我的金豆管理

                    </div>
                </li>
                <li class="aui-list-view-cell" tapmode onclick="openToTwo('myQrcode_win')">
                    <div class="aui-arrow-right">
                        <i class="aui-iconfont radius-50 aui-bg-success aui-icon-qrcode"></i>我的推荐二维码

                    </div>
                </li>
                <li class="aui-list-view-cell" tapmode onclick="openToTwo('addressList_win')">
                    <div class="aui-arrow-right">
                        <i class="aui-iconfont radius-50 aui-bg-primary aui-icon-location"></i>我的收货地址

                    </div>
                </li>
                <li class="aui-list-view-cell" tapmode onclick="openToTwo('myFans_win')">
                    <div class="aui-arrow-right">
                        <i class="aui-iconfont radius-50 aui-bg-danger aui-icon-friendfamous"></i>我的粉丝
                    </div>
                </li>
            </ul>

            <ul class="aui-list-view">
                <li class="aui-list-view-cell" tapmode onclick="exit()">
                    <div class="aui-text-danger aui-text-center ">
                        退出登录
                    </div>
                </li>
            </ul>
        </div>
    </div>
</div>

<div class="aui-dialog aui-hidden" id="dialog">
    <div class="aui-dialog-header">确定要退出登录吗？</div>
    <div class="aui-dialog-body aui-text-center">
        本地信息将被清空
    </div>
    <div class="aui-dialog-footer">
        <div class="aui-dialog-btn aui-text-danger" tapmode onclick="cancel()">取消</div>
        <div class="aui-dialog-btn aui-text-info" tapmode onclick="confirm()">确定</div>
    </div>
</div>

</body>
<script type="text/javascript" src="../script/jquery-1.11.3.js"></script>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/myInfo.js"></script>
<!--<script type="text/javascript" src="../script/md5.min.js"></script>-->
<script type="text/javascript">
    var imgBase64;
    var identitySwitch = "buyer"//用户类型
    var myInfoData;
    apiready = function () {
//        api.refreshHeaderLoading();
        api.parseTapmode();
        //getInfo();
//        alert(user_namaae)
        api.addEventListener({
            name: 'keyback'
        }, function(ret, err) {
            return;
        });
//        api.setRefreshHeaderInfo({
//            visible : true,
//            loadingImg : 'widget://image/ptr_pull.png',
//            bgColor : '#efeff4',
//            textColor : '#959595',
//            textDown : '刷新动态',
//            textUp : '松开刷新',
//            showTime : true
//        }, function(ret, err) {
////            page = 1;
////            isLock=false;
//            getStorageAll();
//            getUserInfo();
//        });
        getStorageAll();
        if(user_id){
            getUserInfo();
        }

//        alert(jifen_left)
        //重新登录监听
        api.addEventListener({
            name: 'reGetMyInfo'
        }, function (ret) {
            if (ret && ret.value) {
//                isLogin();
                getStorageAll();
                getUserInfo();
            }
        });

        //提现后的监听
        api.addEventListener({
            name:"updateUserInfo"
        }, function (ret, err) {
            if (ret && ret.value) {
                getUserInfo();
            }
        })

    }

    function updatePage() {
        document.documentElement.scrollTop = document.body.scrollTop =0;//返回顶部

        getUserInfo();
    }


    //退出登录 add by ekin
    function exit(){
        $api.append($api.dom("body"),'<div class="aui-mask"></div>');
        $api.removeCls($api.dom(".aui-dialog.aui-hidden"),"aui-hidden");
        api.sendEvent({
            name: 'dialogEvent',
            extra: {type:'show'}
        });
    }

    function cancel(){
        $api.remove($api.dom(".aui-mask"));
        $api.addCls($api.dom(".aui-dialog"),"aui-hidden");
        api.sendEvent({
            name: 'dialogEvent',
            extra: {type:'hidden'}
        });
    }

    function confirm(){
        $api.clearStorage();

        api.toast({
            msg: '登出成功',
            duration: 2000,
            location: 'bottom'
        });
        goToHome(0);

        cancel();
    }

</script>
</html>